1. Field of the Invention
The invention relates to a semiconductor memory for storing analog signals in memory cells. Specifically, the semiconductor memory can detect defective data in the memory cells, and then compensate the defective data, and finally output the analog signal with very little noise.
2. Description of the Related Art
Non-volatile memory, such as EEPROM and flash EPROM storing analog signals, is disclosed in U.S. Pat. No. 5,638,320. Such a non-volatile memory stores the analog signals that correspond to respective one of data writing threshold voltages Vrt of memory cell transistors. The analog signal stored in one memory cell is read out (or restored) by measuring a threshold voltage of the memory cell transistor. The relationship between the threshold voltage of the memory cell transistor and the analog signal is shown in FIG. 11. The threshold voltages Vt of memory cell transistors storing analog signals are n a range between a minimum read-out voltage Vrtmin and a maximum read-out voltage Vrtmax, which is higher than an initial threshold voltage Vtint. The initial threshold voltage Vtint means a threshold voltage of a memory cell during the erase. The analog signal is stored by controlling precisely the amount of charge to be injected onto the floating gate of the memory cell transistor. Channel-hot-electron-injection is generally used to write an analog signal in the memory cell.
FIG. 12 shows a relationship between a saturation threshold voltage Vrt of the memory cell transistor and a total accumulated write time, when control gate voltage Vpp is changed in the range of 8v.about.13v during the data writing operation of the flash EPROM. By changing the control gate voltage Vpp, the amount of charge in the floating gate is changed. As a result, a saturation threshold voltage Vst of the memory cell is changed. When the Channel-hot-electron-injection is used, the higher the control gate voltage Vpp, the higher the saturation threshold voltage Vst.
On some occasions, even if these non-volatile memories are used in an electronic product, the charge stored in the memory cell may leaks accidentally. This phenomenon is called a "data holding characteristic defect" (hereinafter referred to as "defective data"). When a memory cell containing defective data is selected to be read out, an analog signal having a minimum voltage, which is not the analog signal to be read out, is read out. For example, when the memory cell at the address N has defective data, and analog signals having high voltages are stored in the memory cells at the addresses N-1 and N+1, which precede or follow the address N, a large distortion is included on the waveform of the analog signal outputted.